function opendialog(src,target){
			var htm='<div class="col-sm-2"><input type="button" value="选择" class="btn btn-primary btn-normal" data-toggle="modal" data-target="#'+target+'Modal"></input></div><div class="col-sm-2">'
				+'<div id="'+target+'Modal" class="modal fade" aria-labelledby="myModalLabel" role="dialog" tabindex="-1"  aria-hidden="true" style="left:200px;top:10px;">'
				+'<iframe id="'+target+'_iframe" name="'+target+'_iframe" src="'+src+'" width="800px;" height="600px;"> </iframe></div>';
			$("#"+target).closest("div .form-group").append(htm);
			//给iframe绑定加载完成事件
			var iframe=$("#"+target+"_iframe")[0];
			if (iframe.attachEvent){  
			     iframe.attachEvent("onload", function(){  
			    	 add_iframe();
			     });  
			 } else {  
			     iframe.onload = function(){  
			    	 add_iframe();
			          
			     };  
			 }
			
			function add_iframe(){
				var body=$(window.frames[target+"_iframe"].document).find("body");
				//弹窗去掉新增等按钮
				body.find("div.panel-heading").hide();
				body.find("table tr").each(function(){
					$(this).find("th:last,td:last").hide();
				});
				
				//给弹窗加载鼠标样式
				$("tbody",body).mouseover(function(){
					$(this).attr("style","cursor:pointer");
				});

				//给弹窗加载选中颜色
				$("tbody tr",body).click(function(){
					$("tbody tr",body).each(function(){
						$(this).attr("style","");
					});
					$(this).attr("style","color:red;");
				});
				//给弹窗加载确定按钮
				body.append('&nbsp&nbsp&nbsp<input id="submit" value="确定" class="btn btn-primary" type="button"/>&nbsp&nbsp&nbsp<input id="cancel" value="取消" class="btn btn-primary" type="button"/>');
				$("#submit",body).click(function(){
					  $('#'+target+'Modal').modal('hide');
					  var val=$("table tr[style='color:red;'] td:first",body).html();
					  if(val){
						  //过滤回车符号
						  val=val.replace(/[^0-9]/g,'');
						  $("#"+target).val(val);
					  }
				});
				$("#cancel",body).click(function(){
					$('#'+target+'Modal').modal('hide');
				});
				
			}
}			
